<template>
  <div :class="tipClassObj" class="report max-w-[200px] flex items-center justify-center">
    <p class="text-center text-[16px] max-w-[200px] font-normal overflow-ellipsis overflow-hidden whitespace-nowrap">
      {{ msg }}
    </p>
  </div>
</template>

<script lang="ts" setup>
const props = defineProps<{ tipClassObj: Object; msg: String }>();
</script>
<style lang="scss" scoped>
.report {
  min-width: 56px;
  height: 56px;

  p {
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    color: #000;
    cursor: pointer;
  }
}

.error {
  animation: red;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.warn {
  animation: huang;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.normal {
  animation: green;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes red {
  0% {
    background: url("@/assets/images/floornum/colour/red/01.png") no-repeat center;
  }

  50% {
    background: url("@/assets/images/floornum/colour/red/02.png") no-repeat center;
  }

  100% {
    background: url("@/assets/images/floornum/colour/red/03.png") no-repeat center;
  }
}

@keyframes huang {
  0% {
    background: url("@/assets/images/floornum/colour/yellow/01.png") no-repeat center;
  }

  50% {
    background: url("@/assets/images/floornum/colour/yellow/02.png") no-repeat center;
  }

  100% {
    background: url("@/assets/images/floornum/colour/yellow/03.png") no-repeat center;
  }
}

@keyframes green {
  0% {
    background: url("@/assets/images/floornum/colour/green/01.png") no-repeat center;
  }

  50% {
    background: url("@/assets/images/floornum/colour/green/02.png") no-repeat center;
  }

  100% {
    background: url("@/assets/images/floornum/colour/green/03.png") no-repeat center;
  }
}
</style>
